1. Field of the Invention
The present invention relates to an image processing apparatus, and more specifically, to a measure to cope with noises generated by an image processing apparatus which carries out image modification processing to invert at least a portion of a binary signal obtained through binary conversion of an image signal on which resolution correction for improving spatial resolution has been carried out.
2. Description of the Related Art
An image inputting apparatus has been known which obtains an image signal carrying image information of an original by scanning the original with an image sensor or the like and converting the original image into an electric signal (for example, a scanner, or a stencil making apparatus). To improve optical resolution, it is general for such an image inputting apparatus to carry out resolution correction for improving the spatial resolution of an image (for example, MTF correction) on an image signal having been obtained.
After an image signal have been binary converted, if the image wherein white pixels are scarcely seen in a black pixel dominant area (a black pixel area) is printed by a printer for example, the white pixels in the black pixel area are not so conspicuous. However, when such an image is printed by a printer after inversion processing or inside whitening processing has been carried out thereon, black pixels which have been inverted from scarce white pixels in a white pixel dominant area (a white pixel area) which has been inverted from the black pixel area become conspicuous. This visual phenomenon has been known.
FIG. 10 is a diagram showing this visual phenomenon and shows a relation between the human visual sense and a ratio of black pixels within an area printed by a printer. In the area where black pixels are dominant (a portion to the right in the figure), the ability to identify a predetermined number of white pixels (A) therein is low and the white pixels are not conspicuous. In the area (a portion to the left of FIG. 10) where black pixels are scarce, that is, the area wherein white pixels are dominant, the ability to identify the same number of black pixels (B) therein is high and the black pixels are very conspicuous.
Especially in stencil making printing for example, the finish itself of printing tends to extend areas of black pixels due to an effect so-called smear of ink. Therefore, black pixels in a white pixel dominant area become much more conspicuous.
When MTF correction is carried out on an image signal, the above phenomenon becomes more conspicuous. This is because that a white noise signal mixed with an image signal output from an image sensor or the like and having the density of black becomes too enhanced by binary conversion to be at the level of white after MTF correction has been carried out on the image. Therefore, in some cases, after binary conversion has been carried out on a signal having been MTF corrected and a predetermined area has been specified by a digitizer or the like, if signal inverting processing (hereinafter called image modification processing), for example inversion processing and inside whitening processing on the signal in the predetermined area or hatching processing on the area whose inside has been whitened, is carried out on at least a portion of the signal having been binary converted, a portion of the image in the predetermined area which should be inverted from black to white is not inverted and remains black. As a result, black noises in white background become conspicuous.
Hereinafter, the reason why this phenomenon becomes conspicuous after binary conversion has been carried out on a signal having been MTF corrected. MTF correction will first be explained briefly. FIG. 11 shows a general MTF correction method. In this MTF correction, the value of a target pixel A to be processed is doubled (D=A.times.2). A value E which is a sum of the values B and C of pixels neighboring with A in the horizontal (main scanning) direction (E=B+C) is divided by 2 to make F (F=E.div.2), and F is subtracted from D to make G (G=D-F). In this manner, when the value A of the target pixel is different from the values of neighboring pixels B and C, the value A is changed to a larger one if A is larger than those, and to a smaller one if otherwise. Therefore, by sequentially applying this MTF correction along the main scanning direction, optical resolution along the main scanning direction can be improved maintaining the average (the average density) of the values in the image signal. It is needless to say that vertical optical resolution can be improved as well by applying this correction to pixels neighboring with the target pixel in vertical direction.
The phenomenon in which black pixels due to a noise signal are created by inversion processing on a signal having been MTF corrected will be explained next. FIG. 12 shows an example of inversion processing. The basis of the inversion processing is to carry out logical inversion on a target pixel A before processing. In the block diagram and logic expression in FIG. 12, a circuit for selecting whether to carry out inversion processing is further added to the above basis.
By carrying out this inversion processing, processing shown at the bottom of FIG. 12 corresponding to a selecting signal C from the selecting circuit is carried out on the target pixel A before inversion. In the case of non-inversion (the selecting signal C is 0), a target pixel D after the processing has the same logic as the target pixel A before the processing, while in the case of inversion (the selecting signal C is 1), the target pixel D after the processing has the logic inverted from that of the target pixel A before the processing. The case where this inversion processing is actually applied to an image signal will be explained next.
An image signal carrying image information of an original is obtained by scanning the original by using an image sensor and converting the original image into an electric signal, and the image signal is converted from analogue to digital by using an A/D converter. An example of the values of the digital signal is shown as a table in FIG. 13(A). In FIG. 13(A), the value 60 of a pixel K3 is a little smaller than the value 80 of the surrounding pixels, and shows a small noise component. However, when binary conversion is carried out on these pixels wherein the values 50 or smaller are converted to white pixels, both the pixel K3 and the surrounding pixels are binary converted to black pixels. Therefore, the pixel K3 does not turn out to be a noise which can be recognized as a white pixel in a black pixel area. Consequently, when the inversion processing is carried out thereon, the pixel K3 becomes a white pixel and it does not turn out to be a noise recognized as a black pixel. However, when the inversion processing is carried out after the MTF correction on the pixels, the pixel K3 becomes a black noise pixel.
The values after MTF correction carried out on the signal shown in FIG. 13(A) are shown as a table in FIG. 13(B). As shown in FIG. 13(B), the value of the pixel K3 has changed from 60 to 40 after the MTF correction, and the effect as a noise is greater than before the correction.
FIG. 14(A) is a table showing data after binary conversion on the signal in FIG. 13(B) wherein the pixels having the values 50 or smaller have been converted into white pixels and the pixels having the values larger than 50 have been converted into black pixels. The noise component in the pixel K3 is recognized as a white pixel in an area of black pixels.
FIG. 14(B) shows a table after inversion processing on the pixels in FIG. 14(A), and FIG. 14(C) shows a visual expression of the pixels in FIG. 14(B). As shown in FIGS. 14(B) and 14(C), the pixel K3 becomes a white pixel if no MTF correction has been carried out thereon, while it becomes a black pixel after the MTF correction. As a result, this black pixel becomes conspicuous.
The process through which a black pixel due to a noise signal is created by carrying out inside whitening processing on a signal after MTF correction is explained next. The process through which data after MTF correction are created is the same as in the explanation of the inversion processing in FIG. 12. FIG. 15 shows an algorithm of the inside whitening processing.
In the inside whitening processing, a cross-shape filter (+) composed of pixels B and C in vertical direction, pixels D and E in horizontal direction, and a target pixel A before processing at the center of these 4 pixels is applied sequentially to image data. When the pixels D and E neighboring with the target pixel A in the horizontal direction and the pixels B and C neighboring with the target pixel A in the vertical direction are all black pixels (the pixel arrangement in this state is called inside whitening processing target), a target pixel K after the processing is forced to be white regardless of the logic (whether the target pixel is a white pixel or a black pixel) of the target pixel A before the processing. This is the basic processing of the inside whitening processing. A circuit for selecting the inside whitening processing is added to the inside whitening processing shown as a block diagram and a logic expression in FIG. 15.
Through this inside whitening processing, the processing shown in FIG. 16 is carried out on the target pixel A before the processing in response to the neighboring pixels B through E and a selecting signal J from the selecting circuit. For a pixel pattern shown in FIG. 16(A), in the cases of upper edge judgment (a pixel c2 above a target pixel c3 is white; B=0), lower edge judgment (a pixel c7 below a target pixel c6 is white; C=0), left edge judgment (a pixel a5 to the left of a target pixel b5 is white; D=0), and right edge judgment (a pixel f5 to the right of a target pixel e5 is white; E=0), the target pixels c3, c6, b5 and e5 after the processing are not white. However, if they are in the state of the inside whitening processing target (see FIG. 16(F)), a target pixel d4 after the processing is forced to be white since neighboring pixels c4 and e4 in the horizontal direction and d3 and d5 in the vertical direction are all black. In the logic expressions in FIGS. 16(B)-(F), black pixels are expressed as 1 and white pixels are 0.
The cross-shape filter in the above explanation having reference pixels and the target pixel in its center has only one pixel in each direction (upper, lower, left, and right) and the border after the inside whitening processing has the thickness of one pixel. However, by extending the range of the reference pixels in each direction (to make the cross-shape enlarged in each direction), the border after the inside whitening processing can be thickened.
FIG. 17(A) is a table showing data wherein the data after the MTF correction shown in FIG. 14(A) have been binary converted to white if the values are 50 or smaller and to black if otherwise and inside whitened thereafter. FIG. 17(B) shows a visual expression of the data. As shown in FIGS. 17(A) and 17(B), the target pixel K3 before the inside whitening processing appears to be a mere white pixel, while it becomes very conspicuous after the inside whitening processing, because pixels surrounding K3 generate more black pixels than in the above inversion processing, due to the inside whitening processing algorithm.